﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CartContent.ascx.cs" Inherits="ElectronicSelling.UserControl.CartContent" %>

<%@ Register Src="~/UserControl/LoginAndRegister.ascx" TagPrefix="uc" TagName="LoginAndRegister" %>
<table cellspacing="0" cellpadding="5">
    <tr>
        <th width="20px">STT</th>
        <th>Thông tin sản phẩm</th>
        <th width="80px">Giá bán</th>
        <th>Số lượng</th>
        <th>Thành tiền</th>
        <th>Cập nhật</th>
    </tr>
    <asp:Repeater ID="rptCartDetail" runat="server" OnItemCommand="rpt_ItemCommand">
        <ItemTemplate>
            <tr>
                <td>
                    <asp:Label ID="lblProductId" Visible="false" runat="server" Text='<%#Eval("ProductId") %>'></asp:Label>
                    <center><%#Eval("Position") %></center>
                </td>
                <td>
                    <div class="cart_img">
                        <img src="<%#Eval("Image") %>" />
                    </div>
                    <div class="cart_product">
                        <a href="DetailProduct.aspx?sid=<%#Eval("SectionId") %>&cid=<%#Eval("CategoryId") %>&pid=<%#Eval("ProductId") %>"><%#Eval("Name") %></a>
                    </div>
                </td>
                <td>
                    <span class="old_price"><%#Eval("OldPrice", "{0:0,0}") %></span>
                    <span class="price"><%#Eval("CurrentPrice", "{0:0,0}") %> đ</span>
                </td>
                <td>
                    <asp:TextBox ID="txtQuantity" runat="server" Text='<%#Eval("Quantity") %>'></asp:TextBox>
                    <br />
                    <asp:Button ID="btnUpdateQuantity" CommandArgument='<%#Eval("ProductId") %>' CommandName="Update" CssClass="button_update" runat="server" Text="Cập nhật" />
                </td>
                <td><strong><%#Eval("Total", "{0:0,0}") %> đ</strong></td>
                <td>
                    <center>
                           <asp:ImageButton runat="server" ID="btnRemove" Tooltip="Remove" CssClass="imagebutton" ImageUrl="../Images/Remove.png"
                               CommandArgument='<%#Eval("ProductId") %>' CommandName="Remove" >
                           </asp:ImageButton>
                        </center>
                </td>
            </tr>
        </ItemTemplate>
    </asp:Repeater>
    <tr>
        <td colspan="4" class="total_text">Tổng giá trị đơn hàng</td>
        <td colspan="2" class="total"><%=GetTotalOrder() %> đ</td>
    </tr>
</table>
<div class="cart_control">
    <asp:Button ID="btnBuyContinue" runat="server" Text="Mua tiếp" OnClick="btnControl_Click" CssClass="left" />
    <asp:Button ID="btnPayment" runat="server" Text="Thanh toán Online" OnClick="btnControl_Click" CssClass="right" />
    <%--<input type="button" name="btnSendOrder" id="btnSendOrder" runat="server" value="Gửi đơn đặt hàng" class="right send_order" />--%>
    <asp:Button ID="btnSendOrder" runat="server" Text="Gửi đơn đặt hàng" OnClick="btnControl_Click" CssClass="right" />
    <asp:Button ID="btnDeleteCart" runat="server" Text="Xóa giỏ hàng" OnClick="btnControl_Click" CssClass="right" />
</div>

<div id="login_register" class="pop_content">
    <uc:LoginAndRegister runat="server" ID="LoginAndRegister" />
</div>
<div id="wallpaper"></div>


